
<main-layout [sliderWidth]="sliderWidth" (toggle)="this.toggleCollapsed($event)">
  <main-header>
    <ul nz-menu [nzMode]="'horizontal'" style="padding: 0 24px;line-height: 46px;">
      <li [nzSelected]="ProductlistService.type1=='all'" nz-menu-item
          [routerLink]="ProductlistService.type2?'/member/product/list/all/'+ProductlistService.type2:'/member/product/list/all' ">
        全部商品
      </li>
      <li [nzSelected]="ProductlistService.type1=='in'" nz-menu-item
          [routerLink]="ProductlistService.type2?'/member/product/list/in/'+ProductlistService.type2:'/member/product/list/in' ">
        上架商品
      </li>
      <li [nzSelected]="ProductlistService.type1=='out'" nz-menu-item
          [routerLink]="ProductlistService.type2?'/member/product/list/out/'+ProductlistService.type2:'/member/product/list/out' ">
        下架商品
      </li>
    </ul>
  </main-header>
  <main-slider>
    <div style="height:100%;">
      <ul nz-menu [nzMode]="'inline'" [nzInlineCollapsed]="isCollapsed" style="height:100%;"
          [style.overflow-y]="isCollapsed?'':'auto'" [style.overflow-x]="isCollapsed?'':'hidden'">
        <li class="special-menu-li" nz-submenu [(nzOpen)]="typeOpen">
		        	<span title (click)="stop($event)" class="special-menu">
			            <i class="anticon anticon-appstore-o"></i>
			            <span>分类管理</span>
			            <i style="margin-left:10px;color:#1890FF" class="anticon anticon-plus-circle-o"
                     [class.hidden]="isCollapsed" (click)="addInput($event)"></i>
		          	</span>
          <ul>
            <li *ngIf="addshow" class="text-center">
              <bx-input (submit)="addType()" bxmax="4" (bxBlur)="addType()" style="width:146px;" bxplaceholder="请输入分类名"
                        [(inputvalue)]="typeValue"></bx-input>
            </li>
            <li nz-menu-item [class.ant-menu-item-special]="!ProductlistService.type2"
                [routerLink]="'/member/product/list/'+ProductlistService.type1 ">全部商品
            </li>
            <li nz-menu-item [class.ant-menu-item-special]="ProductlistService.type2==item.id "
                *ngFor="let item of groupList"
                [routerLink]=" '/member/product/list/'+ProductlistService.type1+'/'+item.id "
                style="padding-right:0;">
              <div [class.hidden]="item.edit"  >
                <div class="fr menu-item-btn" >
                  <i class="anticon anticon-edit" (click)="typeEdit($event,item)"></i>
                  <i class="anticon anticon-delete" (click)="typeDel($event,item)"></i>
                </div>
                <span>{{item.name}}</span>
              </div>

              <div (click)="stop($event)" #editInput style="margin-left: -30px;">
                <bx-input *ngIf="item.edit" (submit)="saveType(item)" bxmax="4" (bxBlur)="saveType(item)"
                          style="width:146px;" bxplaceholder="请输入最长4位分类名"  [(inputvalue)]="typeValue"></bx-input>
              </div>

            </li>
          </ul>
        </li>
      </ul>
    </div>
  </main-slider>
  <main-content>

    <router-outlet></router-outlet>
  </main-content>
</main-layout>
